home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / bbs / solace1.zip / WAYRETH.REF < prev   
Text File  |  1997-06-28  |  11KB  |  564 lines

  1. ;note to .ref masters:
  2. ;replace castle3 with something else to use this .ref for other dwellings
  3. ;this .ref uses no long term vars, instead it makes its own data file - this
  4. ;means upgrading the game will not make people 'lose ownership' of their
  5. ;stuff.
  6.  
  7.  
  8. @#MYBANK
  9. ;team treasury
  10. @do moveback
  11. @do `p20 is 0
  12. @if tres5.dat exist true then do
  13.   @begin
  14.   @readfile tres5.dat
  15. `p20
  16.   @
  17.   @end
  18.  
  19. @clearblock 20 21
  20. @do move 3 21
  21. @do write
  22. `r0`2  Treasury is at `$$`p20`2 - (`0T`2)ake, (`0L`2)eave or (`0N`2)evermind? [`0N`2] :`%`x
  23. @do readspecial `s01 NTL
  24. @if `s01 is N then do
  25.  @begin
  26.  @do saybar
  27. You close the safe, carefully.
  28.  @closescript
  29.  @end
  30.  
  31. @if `s01 is T then do
  32.   @begin
  33.   @do move 5 23
  34.   @do write
  35. `0`r0Amount? `0: `%
  36.  @do readnum 10 0
  37.   @do `p21 is `v40
  38.   @if `p21 < 1 then `p21 is 0
  39.   @if `p21 > `p20 then do
  40.     @begin
  41.     @clearblock 21 24
  42.     @do saybar
  43. Not enough in here for that.
  44.     @closescript
  45.     @end
  46.  
  47.  @if `p21 is 0 then do
  48.    @begin
  49.     @clearblock 21 24
  50.     @do saybar
  51. You take nothing.
  52.     @closescript
  53.    @end
  54. //withdrawl.. we read from the file again so cheating won't be possible with
  55. //correct timing
  56.   @readfile tres5.dat
  57. `p20
  58.   @
  59.  
  60.   @if `p20 < `p21 then do
  61.     @begin
  62.     @clearblock 21 24
  63.     @do saybar
  64. Oh no!  Someone took the money while you were thinking about it!
  65.     @closescript
  66.     @end
  67.  
  68.     @do `p20 - `p21
  69.     @do money + `p21
  70.   @do delete tres5.dat
  71.   @writefile tres5.dat
  72. `p20
  73.   @
  74.     @clearblock 21 24
  75.     @do saybar
  76. `2You take `$`p21`2 from the treasury.
  77.  
  78. //if not owner, lets notify him
  79.  
  80. @readfile wayreth.dat
  81. `p20
  82. `s01
  83. @
  84. ;load owner and current password
  85.  
  86. @if `p20 not &playernum then do
  87.   @begin
  88.    @writefile mail\mail`p20.dat
  89.   `0Tower of Wayreth Reports:
  90. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  91. `0  `n`2 has taken `$$`p21 `2from the treasury.
  92.  
  93.   @end
  94.   @closescript
  95.   @end
  96.  
  97. @if `s01 is L then do
  98.   @begin
  99.   @do move 5 23
  100.   @do write
  101. `0`r0Amount? `0: `%
  102.  @do readnum 10 &money
  103.   @do `p21 is `v40
  104.   @if `p21 < 1 then `p21 is 0
  105.   @if `p21 > money then do
  106.     @begin
  107.     @clearblock 21 24
  108.     @do saybar
  109. You are not carrying that much!
  110.     @closescript
  111.     @end
  112.  
  113.  @if `p21 is 0 then do
  114.    @begin
  115.     @clearblock 21 24
  116.     @do saybar
  117. You decide to leave nothing.  Ha!
  118.     @closescript
  119.    @end
  120.  
  121.   @do money - `p21
  122.  
  123. //deposit.. we read from the file again so cheating won't be possible with
  124. //correct timing
  125.   @readfile tres5.dat
  126. `p20
  127.   @
  128.   @do `p20 + `p21
  129.   @do delete tres5.dat
  130.   @writefile tres5.dat
  131. `p20
  132.   @
  133.     @clearblock 21 24
  134. //if not owner, lets notify him
  135.  
  136. @readfile wayreth.dat
  137. `p20
  138. `s01
  139. @
  140. ;load owner and current password
  141.  
  142. @if `p20 not &playernum then do
  143.   @begin
  144.    @writefile mail\mail`p20.dat
  145.   `0Tower of Wayreth Reports:
  146. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  147. `0  `n`2 has deposited `$$`p21 `2to the treasury.
  148.  
  149.   @end
  150.  
  151.  
  152.     @do saybar
  153. `2You leave `$`p21`2 in the treasury.
  154.   @closescript
  155.  
  156.  
  157.   @end
  158.  
  159.  
  160. @#signhelp
  161. @do moveback
  162. @do saybar
  163. `0Sign: `2Be careful what you touch.
  164.  
  165. @#sign1
  166. @do moveback
  167. @do saybar
  168. `0Sign: `4Bonetown
  169.  
  170. @#sign2
  171. @do moveback
  172. @do saybar
  173. `0Sign: `9Porttown
  174. @#sign3
  175. @do moveback
  176. @do saybar
  177. `0Sign: `2Greentree
  178.  
  179. @#warpme
  180. @loadmap &map
  181. @drawmap
  182. @update
  183. @do quebar
  184. `%Wow, what a ride!
  185.  
  186. @#stone1
  187. ;Greentree
  188. @do x is 51
  189. @do y is 16
  190. @do map is 1356
  191. @do goto warpme
  192.  
  193. @#stone2
  194. ;Bonetown
  195. @do x is 68
  196. @do y is 5
  197. @do map is 1572
  198. @do goto warpme
  199.  
  200. @#stone3
  201. ;Porttown
  202. @do x is 62
  203. @do y is 13
  204. @do map is 956
  205. @do goto warpme
  206.  
  207.  
  208.  
  209.  
  210. @#FOUNTAIN
  211. ;free heal
  212. @offmap
  213. @do moveback
  214. @show
  215. `r0`c  `r1  The Fountain  `r0
  216.  
  217.   `2The strange water makes you tingle.
  218.  
  219.   `%YOU ARE COMPLETEY HEALED.
  220.  
  221. `k
  222. @do `p02 is `p03
  223. @drawmap
  224. @update
  225.  
  226.  
  227.  
  228. @#doorguard
  229. @do moveback
  230. @label startg
  231. ;guy who owns on it pushes against the door guard symbol.  This lets him
  232. ;control the password to gain entrance to the castle, as well as sell it
  233. ;back or transfer ownership.
  234. @if wayreth.dat exist false then do
  235.   @begin
  236.   @do saybar
  237. `0"You must leave now, human," `2the troll commands.
  238.  @closescript
  239.   @end
  240.  
  241. @readfile wayreth.dat
  242. `p20
  243. `s01
  244. @
  245. ;load owner and current password
  246.  
  247. @if `p20 not &playernum then do
  248.   @begin
  249.   @do saybar
  250. You wave to the troll, nice of it to let you in.
  251.   @closescript
  252.   @end
  253. @busy
  254.  
  255.  
  256. @do `v01 is 1 ;set default choice to 1
  257. @show
  258. `r0`c  `r1 Instructing your servants `r0
  259.  
  260.   `2The tiny troll snaps to attention when he sees you are going to
  261.   address him.
  262.  
  263. @do write
  264. `x`x
  265. @choice
  266. Set password to gain entrance (currently is `0`s01`%)
  267. Ownership options
  268. Leave
  269. @
  270. @if responce is 2 then do
  271.  @begin
  272.  @show
  273. `r0`c  `r1 Ownership Options `r0
  274.  
  275.   `2You retrieve your deed and carefully look it over.
  276.    
  277.    @do `v01 is 1
  278.    @do write
  279. `x`x
  280.    @choice
  281. Transfer deed to someone else
  282. Sell property back to the bank for `$20000`%.
  283. Do nothing of the sort
  284.  @if response is 1 then do
  285.    @begin
  286.    @show
  287. `\`\  `2Transfer to whom?
  288.    @chooseplayer `p20
  289.  
  290.    @if `p20 is 0 then do
  291.     @begin
  292.     @show
  293.   `2You decide to keep your domain - for now.`\`\`k
  294.     @do goto startg
  295.     @end
  296.    @do `s02 is getname `p20
  297.    @show
  298. `2  Are you sure you wish to give your tower to `0`s02`2?
  299. @do write
  300. `x`x
  301. @choice
  302. Yes
  303. Not on your life.
  304.  @if responce is 2 then do
  305.    @begin
  306.     @show
  307. `\`\  `2You decide to keep your domain - for now.`\`\`k
  308.     @do goto startg
  309.    @end
  310.  
  311.   @do delete wayreth.dat
  312.   @writefile wayreth.dat
  313. `p20
  314. `s01
  315. 0
  316. 0
  317. 0
  318. 0
  319.    @writefile mail\mail`p20.dat
  320.   `0Business note:
  321. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  322. `0  `n`2 has transferred ownership of thr Tower of Wayreth to you. 
  323.   Password to enter will remain `0"`s01"`2 unless
  324.   `2you come by and change it.
  325.  
  326.     @do addlog
  327.   `0`n`2 has given `%the Tower of Wayreth`2 to `0`s02`2!
  328.      @routine seperate in gametxt.ref
  329.  
  330.     @show
  331. `\`\  `2Deed transfered.  Oh well - it was fun while it lasted.`\`\`k
  332.    @do goto done
  333.    @end
  334.   @if response is 2 then do
  335.     @begin
  336.     @show
  337. `\`\`2  Are you sure you wish to sell your tower back to the bank?`\
  338. @do `v01 is 1
  339. @do write
  340. `x`x
  341. @choice
  342. Yes
  343. Not on your life.
  344.  @if responce is 2 then do
  345.    @begin
  346.     @show
  347. `\`\  `2You decide to keep your domain - for now.`\`\`k
  348.     @do goto startg
  349.    @end
  350.  
  351.   @do delete wayreth.dat
  352.   @do money + 20000
  353.   @show
  354. `\`\  `%TOWER SOLD!`2`\`\`k
  355.     @do addlog
  356.   `0`n`2 has sold `%the Tower of Wayreth`2 back to the bank!
  357.     @routine seperate in gametxt.ref
  358.     @do goto done
  359.     @end
  360.  
  361.  
  362.   @do goto startg
  363.  @end
  364.  
  365. @if responce is 1 then do
  366.   @begin
  367.   @do write
  368. `\`\  `0"And the new password, s&sir?" `2(enter `4NONE`2 for no access to anyone)`\  `2Password:`x
  369.   @do readstring 40 `s01 `s01 
  370.   @do `p20 is length `s01
  371.   @if `p20 < 2 then do
  372.    @begin
  373.    @show
  374. `\`\  `2You decide the current password is ok.`\`\`k
  375.    @do goto startg
  376.    @end
  377.   @do delete wayreth.dat
  378.   @writefile wayreth.dat
  379. &playernum
  380. `s01
  381. 0
  382. 0
  383. 0
  384. 0
  385. @show
  386. `\`\  `0"Yes s&sir, I will not forget it!" `2the troll promises.`\`\`k
  387.    @do goto startg
  388.   @end
  389.  
  390. @drawmap
  391. @update
  392.  
  393. @#sign
  394. @do moveback
  395.  
  396.  @if wayreth.dat exist false then do
  397.  @begin
  398.  @do saybar
  399. Tower of wayreth - For sale cheap, enquire inside.
  400.  @end 
  401.  
  402. @if wayreth.dat exist true then do
  403.  @begin
  404. @readfile wayreth.dat
  405. `p20
  406. `s01
  407. @
  408. @do `s01 is getname `p20
  409.  @do saybar
  410. `2Property of `0`s01`2.
  411.  @end 
  412.  
  413. @#enter
  414. @do moveback
  415. @offmap
  416. @if wayreth.dat exist false then do
  417.   @begin
  418.   @show
  419. `r0`c  `r1 `%For Sale `r0
  420.  
  421.   `2The Tower of Wayreth may be old and dalapidated but it still houses that old 
  422.   world charm of an enchanters hostel.  Perhaps if you buy it, people would
  423.   call you 'that crazy old wizard who lives in that tower!'.  You just
  424.   can't put a price on that. (ok, it's `$$40,000`2)
  425.  
  426.   Buy now and recieve the following bonuses:
  427.  
  428.   `0* `2An indoor fountain.
  429.  
  430.   `0* `2Some strange rocks upstairs.
  431.  
  432. @do `v01 is 1
  433. @do write
  434. `x`x
  435. @choice
  436. >&money 39999 Purchase it.
  437. <&money 40000 Sigh wistfully and leave since you don't have enough.
  438. >&money 39999 Leave.
  439. @
  440.  
  441. @if responce is 1 then do
  442.   @begin
  443.   @if wayreth.dat exist true then do
  444.     @begin
  445.     @show
  446. `\`\  `2Oh crap!  Someone bought it while you were thinking about it.  You
  447.   will regret your snail like thinking for the rest of your days.`\`\`k
  448.     @do goto done
  449.     @end
  450.  
  451.   @writefile wayreth.dat
  452. &playernum
  453. NONE
  454. 0
  455. 0
  456. 0
  457. 0
  458.     @do money - 40000
  459.     @do addlog
  460.   `0`n `2buys `%The Tower of Wayreth`2!
  461.      @routine seperate in gametxt.ref
  462.  
  463.   @show
  464. `r0`c  `r1 `%Why hello there, landowner! `r0
  465. `\`2  Nice job!  You now own this tower!
  466.  
  467.   `2Enjoy your new home.`\`\`k
  468.   @end
  469.  
  470. @label done
  471. @drawmap
  472. @update
  473. @closescript
  474.   @end
  475.  
  476. @readfile wayreth.dat
  477. `p20
  478. `s01
  479. @
  480.  
  481. @do `p21 is deleted `p20
  482.  
  483. @if `p21 is 1 then do
  484.   @begin
  485.    ;owner got deleted!!!  Lets put it up for sale again.
  486.    @do delete wayreth.dat
  487.     @do addlog
  488.   `%The Tower of Wayreth`2 is put on the market today.
  489.      @routine seperate in gametxt.ref
  490.  
  491.    ;run script again
  492.    @do goto enter
  493.   @end
  494.  
  495. @if `p20 not &playernum then do
  496.   @begin
  497.   @do `s02 is getname `p20
  498.   @do upcase `s01
  499.   @if `s01 is NONE then do
  500.    @begin
  501.    @show
  502. `r0`c  `r1 None shall pass `r0
  503.  
  504.   `2You pound on the door for some time before you get an answer.
  505.  
  506.   `0"Master `s02`0 has declared that `4NO`0 visitors shall be allowed!" `2a
  507.   trollish voice calls from behind the wall.
  508.  
  509.   `4Ouch!
  510.  
  511. `k
  512.    @do goto done
  513.    @end
  514.  
  515.   @show
  516. `r0`c  `r1 Stand and unfold thyself `r0
  517.  
  518. `2  A head pops over the gate.  `0"Halt, you!  What business have you with
  519.   my lord and master, `%`s02`0?" `2a hunched over troll asks.
  520.  
  521. @do write
  522. `x`x
  523. @do `v01 is 1
  524. @choice
  525. Offer an explanation.
  526. Visit later.
  527.   @if response is 1 then do
  528.    @begin
  529.    @do write
  530. `\`\  `2Say what? :`x
  531.   @do readstring 40 NIL `s03 
  532.   @do upcase `s03
  533.   @do upcase `s01
  534.  
  535.   @if `s03 is `s01 then do
  536.     @begin
  537.     @show
  538. `\`\  `0"Welcome to `%The Tower of Wayreth`0,"`2 the troll smiles as he opens the gate.`\`\`k
  539.     @do goto letmein
  540.     @end
  541.    @writefile mail\mail`p20.dat
  542.   `0The Tower of Wayreth Reports:
  543. `2-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  544. `0  `n`2 attempted to sweet talk the troll by saying
  545.   `0"`s03"`2.  `2He was `bNOT`2 allowed in.
  546.  
  547.    @show
  548. `\`\  `2The troll doesn't look too interested.`\`\`k
  549.    @do goto done
  550.    @end
  551.  
  552.   @do goto done
  553.  
  554.   @end
  555.  
  556. ;let him in
  557. @label letmein
  558. @do x is 43
  559. @do y is 19
  560. @do map is 1344
  561. @loadmap 1344
  562. @do goto done
  563. @#done
  564.